Skip to content

Conversation

@jordikroon
Copy link
Contributor

@jordikroon jordikroon commented Dec 21, 2025

Adds documentation for two OPCache functions:

  • opcache_is_script_cached_in_file_cache: checks if a script is cached in OPCache file cache
  • opcache_jit_blacklist: blacklists a function from being JIT compiled

The opcache_jit_blacklist function exists since 2024 but has never been documented. Additionally opcache_is_script_cached_in_file_cache is new since PHP 8.5.

References:
#4995
php/php-src#15559
php/php-src#16979

Doc tracker:
#3872
#4886

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markup issues

Comment on lines 42 to 44
<para>
&return.void;
</para>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<para>
&return.void;
</para>
<simpara>
&return.void;
</simpara>

Comment on lines 33 to 34
<para>
</para>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arnaud-lb can you provide a description?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<para>
</para>
<para>
The function to blacklist, represented as a first class callable. It is also possible to pass an anonymous function, in which case the anonymous function itself is blacklisted.
</para>

@Girgias Girgias requested a review from arnaud-lb January 9, 2026 02:04
Comment on lines 33 to 34
<para>
</para>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<para>
</para>
<para>
The function to blacklist, represented as a first class callable. It is also possible to pass an anonymous function, in which case the anonymous function itself is blacklisted.
</para>

@jordikroon jordikroon requested a review from Girgias January 9, 2026 18:29
@jordikroon
Copy link
Contributor Author

Thank you @Girgias for the review. I also changed the para of other opcache functions to simpara for consistency.

@Girgias
Copy link
Member

Girgias commented Jan 18, 2026

@jordikroon can you please rebase this on the latest master, I created (and ran) some scripts to automatically convert the para tags across the opcache folder and automatically apply this to translations.

@jordikroon jordikroon force-pushed the docs/opcache-methods branch from 470e481 to 9fe9c50 Compare January 18, 2026 21:39
@jordikroon jordikroon force-pushed the docs/opcache-methods branch from 9fe9c50 to 5b2625d Compare January 18, 2026 21:40
@jordikroon
Copy link
Contributor Author

The PR has been rebased with the master @Girgias

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Girgias Girgias merged commit 3c36a56 into php:master Jan 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants